﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows.Forms;

namespace PhongMachTu
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            bool IsFirstTime;
            using (Mutex Checker = new Mutex(true, "LoiIchKy", out IsFirstTime))
            {
                if (IsFirstTime)
                {
                    Application.Run(new GUI.frmDangNhap());
                    if (MsgBox.checkLogin)
                    {
                        Application.Run(new frmHome());
                    }
                }
                else
                    MessageBox.Show("Ứng dụng đang chạy", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);


            }

        }
    }
}
